|
16x12r 2.2.0
|
API for configuring and manipulating 16x12 R Click driver. More...
Topics | |
| 16x12 R Registers List | |
| List of registers of 16x12 R Click driver. | |
| 16x12 R Registers Settings | |
| Settings for registers of 16x12 R Click driver. | |
| 16x12 R MikroBUS Map | |
| MikroBUS pin mapping of 16x12 R Click driver. | |
Functions | |
| void | c16x12r_cfg_setup (c16x12r_cfg_t *cfg) |
| 16x12 R configuration object setup function. | |
| err_t | c16x12r_init (c16x12r_t *ctx, c16x12r_cfg_t *cfg) |
| 16x12 R initialization function. | |
| err_t | c16x12r_default_cfg (c16x12r_t *ctx) |
| 16x12 R default configuration function. | |
| err_t | c16x12r_write_reg (c16x12r_t *ctx, uint8_t reg, uint8_t data_in) |
| 16x12 R write register function. | |
| err_t | c16x12r_write_regs (c16x12r_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
| 16x12 R write registers function. | |
| err_t | c16x12r_read_reg (c16x12r_t *ctx, uint8_t reg, uint8_t *data_out) |
| 16x12 R read register function. | |
| err_t | c16x12r_read_regs (c16x12r_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
| 16x12 R read registers function. | |
| void | c16x12r_enable_device (c16x12r_t *ctx) |
| 16x12 R enable device function. | |
| void | c16x12r_disable_device (c16x12r_t *ctx) |
| 16x12 R disable device function. | |
| void | c16x12r_reset_device_i2c (c16x12r_t *ctx) |
| 16x12 R reset device I2C function. | |
| void | c16x12r_set_rst_pin (c16x12r_t *ctx, uint8_t state) |
| 16x12 R set reset pin state function. | |
| uint8_t | c16x12r_get_intb_pin (c16x12r_t *ctx) |
| 16x12 R get interrupt pin function. | |
| err_t | c16x12r_lock_page (c16x12r_t *ctx) |
| 16x12 R lock page function. | |
| err_t | c16x12r_unlock_page (c16x12r_t *ctx) |
| 16x12 R unlock page function. | |
| err_t | c16x12r_select_page (c16x12r_t *ctx, uint8_t page) |
| 16x12 R select page function. | |
| err_t | c16x12r_write_page_reg (c16x12r_t *ctx, uint16_t page_reg, uint8_t data_in) |
| 16x12 R write page register function. | |
| err_t | c16x12r_write_page_regs (c16x12r_t *ctx, uint16_t page_reg, uint8_t *data_in, uint8_t len) |
| 16x12 R write page registers function. | |
| err_t | c16x12r_read_page_reg (c16x12r_t *ctx, uint16_t page_reg, uint8_t *data_out) |
| 16x12 R read page register function. | |
| err_t | c16x12r_read_page_regs (c16x12r_t *ctx, uint16_t page_reg, uint8_t *data_out, uint8_t len) |
| 16x12 R read page registers function. | |
| err_t | c16x12r_fill_screen (c16x12r_t *ctx) |
| 16x12 R fill screen function. | |
| err_t | c16x12r_clear_screen (c16x12r_t *ctx) |
| 16x12 R clear screen function. | |
| err_t | c16x12r_set_pwm (c16x12r_t *ctx, uint8_t duty) |
| 16x12 R set PWM function. | |
| err_t | c16x12r_set_mode (c16x12r_t *ctx, uint8_t mode) |
| 16x12 R set mode function. | |
| void | c16x12r_set_led_state (c16x12r_t *ctx, uint8_t led_num, uint8_t state) |
| 16x12 R set LED state function. | |
| err_t | c16x12r_write_leds (c16x12r_t *ctx) |
| 16x12 R write LEDs function. | |
| err_t | c16x12r_draw_picture (c16x12r_t *ctx, const uint16_t *image) |
| 16x12 R draw picture function. | |
| err_t | c16x12r_write_char (c16x12r_t *ctx, uint8_t data_in) |
| 16x12 R write character function. | |
| err_t | c16x12r_write_string (c16x12r_t *ctx, uint8_t *data_in, uint16_t speed_ms) |
| 16x12 R write string function. | |
API for configuring and manipulating 16x12 R Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void c16x12r_cfg_setup | ( | c16x12r_cfg_t * | cfg | ) |
16x12 R configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See c16x12r_cfg_t object definition for detailed explanation. |
| err_t c16x12r_clear_screen | ( | c16x12r_t * | ctx | ) |
16x12 R clear screen function.
This function turns off all LEDs on the screen.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t c16x12r_default_cfg | ( | c16x12r_t * | ctx | ) |
16x12 R default configuration function.
This function executes a default configuration of 16x12 R Click board.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void c16x12r_disable_device | ( | c16x12r_t * | ctx | ) |
16x12 R disable device function.
This function sets the SDB pin low to disable the device.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| err_t c16x12r_draw_picture | ( | c16x12r_t * | ctx, |
| const uint16_t * | image ) |
16x12 R draw picture function.
This function draws a picture on the display from a 12-column buffer.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | image | : Pointer to 12x16 image array. |
0 - Success, -1 - Error. | void c16x12r_enable_device | ( | c16x12r_t * | ctx | ) |
16x12 R enable device function.
This function sets the SDB pin high to enable the device.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| err_t c16x12r_fill_screen | ( | c16x12r_t * | ctx | ) |
16x12 R fill screen function.
This function turns on all LEDs on the screen.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
0 - Success, -1 - Error. | uint8_t c16x12r_get_intb_pin | ( | c16x12r_t * | ctx | ) |
16x12 R get interrupt pin function.
This function reads the logic state of the INTB pin.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| err_t c16x12r_init | ( | c16x12r_t * | ctx, |
| c16x12r_cfg_t * | cfg ) |
16x12 R initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See c16x12r_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c16x12r_lock_page | ( | c16x12r_t * | ctx | ) |
16x12 R lock page function.
This function locks the page to prevent further configuration.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t c16x12r_read_page_reg | ( | c16x12r_t * | ctx, |
| uint16_t | page_reg, | ||
| uint8_t * | data_out ) |
16x12 R read page register function.
This function reads a byte from a register on a selected page.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | page_reg | : Combined page and register address. |
| [out] | data_out | : Output data byte. |
0 - Success, -1 - Error. | err_t c16x12r_read_page_regs | ( | c16x12r_t * | ctx, |
| uint16_t | page_reg, | ||
| uint8_t * | data_out, | ||
| uint8_t | len ) |
16x12 R read page registers function.
This function reads multiple bytes from a register range on a selected page.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | page_reg | : Combined page and register address. |
| [out] | data_out | : Output data buffer. |
| [in] | len | : Number of bytes. |
0 - Success, -1 - Error. | err_t c16x12r_read_reg | ( | c16x12r_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out ) |
16x12 R read register function.
This function reads a single byte from the selected register using I2C communication.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Output data byte. |
0 - Success, -1 - Error. | err_t c16x12r_read_regs | ( | c16x12r_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out, | ||
| uint8_t | len ) |
16x12 R read registers function.
This function reads multiple bytes starting from the selected register using I2C communication.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | reg | : Starting register address. |
| [out] | data_out | : Output data buffer. |
| [in] | len | : Number of bytes to read. |
0 - Success, -1 - Error. | void c16x12r_reset_device_i2c | ( | c16x12r_t * | ctx | ) |
16x12 R reset device I2C function.
This function toggles the RST pin to perform an I2C reset.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| err_t c16x12r_select_page | ( | c16x12r_t * | ctx, |
| uint8_t | page ) |
16x12 R select page function.
This function selects the target page for register access.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | page | : Page number. |
0 - Success, -1 - Error. | void c16x12r_set_led_state | ( | c16x12r_t * | ctx, |
| uint8_t | led_num, | ||
| uint8_t | state ) |
16x12 R set LED state function.
This function sets a single LED state to ON or OFF.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | led_num | : LED index (0?191). |
| [in] | state | : LED state (0=OFF, 1=ON). |
| err_t c16x12r_set_mode | ( | c16x12r_t * | ctx, |
| uint8_t | mode ) |
16x12 R set mode function.
This function sets the blinking mode for all LEDs.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | mode | : Blinking mode (0?3). |
0 - Success, -1 - Error. | err_t c16x12r_set_pwm | ( | c16x12r_t * | ctx, |
| uint8_t | duty ) |
16x12 R set PWM function.
This function sets the same PWM duty cycle to all LEDs.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | duty | : PWM duty cycle (0?255). |
0 - Success, -1 - Error. | void c16x12r_set_rst_pin | ( | c16x12r_t * | ctx, |
| uint8_t | state ) |
16x12 R set reset pin state function.
This function sets the RST pin logic state.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | state | : Pin state (0 or 1). |
| err_t c16x12r_unlock_page | ( | c16x12r_t * | ctx | ) |
16x12 R unlock page function.
This function unlocks the page to allow configuration.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t c16x12r_write_char | ( | c16x12r_t * | ctx, |
| uint8_t | data_in ) |
16x12 R write character function.
This function writes a single ASCII character to the display.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | data_in | : ASCII character to write. |
0 - Success, -1 - Error. | err_t c16x12r_write_leds | ( | c16x12r_t * | ctx | ) |
16x12 R write LEDs function.
This function writes the local LED state buffer to the display.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t c16x12r_write_page_reg | ( | c16x12r_t * | ctx, |
| uint16_t | page_reg, | ||
| uint8_t | data_in ) |
16x12 R write page register function.
This function writes a byte to a register on a selected page.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | page_reg | : Combined page and register address. |
| [in] | data_in | : Data to be written. |
0 - Success, -1 - Error. | err_t c16x12r_write_page_regs | ( | c16x12r_t * | ctx, |
| uint16_t | page_reg, | ||
| uint8_t * | data_in, | ||
| uint8_t | len ) |
16x12 R write page registers function.
This function writes multiple bytes to a register range on a selected page.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | page_reg | : Combined page and register address. |
| [in] | data_in | : Data buffer to write. |
| [in] | len | : Number of bytes. |
0 - Success, -1 - Error. | err_t c16x12r_write_reg | ( | c16x12r_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t | data_in ) |
16x12 R write register function.
This function writes a single byte to the selected register using I2C communication.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : Data to be written. |
0 - Success, -1 - Error. | err_t c16x12r_write_regs | ( | c16x12r_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_in, | ||
| uint8_t | len ) |
16x12 R write registers function.
This function writes multiple bytes starting from the selected register using I2C communication.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | reg | : Starting register address. |
| [in] | data_in | : Data buffer to be written. |
| [in] | len | : Number of bytes to write. |
0 - Success, -1 - Error. | err_t c16x12r_write_string | ( | c16x12r_t * | ctx, |
| uint8_t * | data_in, | ||
| uint16_t | speed_ms ) |
16x12 R write string function.
This function scrolls a null-terminated ASCII string across the display.
| [in] | ctx | : Click context object. See c16x12r_t object definition for detailed explanation. |
| [in] | data_in | : Pointer to string to display. |
| [in] | speed_ms | : Scrolling delay in milliseconds. |
0 - Success, -1 - Error.